1. Field of the Invention
The invention relates to a method for graphics mapping of a surface from an at least three-dimensional model space onto a two-dimensional image, in which a texture coordinate is allocated to a point on the surface and the point is projected, onto a pixel of the image along a projection axis. The method includes the following steps:
determining a normalized coordinate which is a ratio of the texture coordinate to a depth of the point along the projection axis;
determining the depth of the point;
determining the texture coordinate by multiplication of the normalized coordinate by the depth; and,
determining an image contribution by the point to an image content of the pixel on the basis of the texture coordinate.
The invention also relates to a device for graphics mapping of a surface from an at least three-dimensional model space onto a two-dimensional image, in which a texture coordinate is allocated to a point on the surface and the point is projected, onto a pixel of the image along a projection axis, which device includes:
coordinate-determining means for determining a normalized coordinate which is a ratio of the texture coordinate to a depth of the point along the projection axis;
depth-determining means for determining the depth of the point;
multiplier means for multiplying the normalized coordinate by the depth in order to obtain the texture coordinate; and,
image-forming means for determining an image contribution by the point to an image content of the pixel on the basis of the texture coordinate.
2. Description of the Related Art
A method of this kind is known from the copending U.S. patent application Ser. No. 08/346971 and its European equivalent EP 656 609 (PHB 33881). In the cited publication a triangle is mapped from a three-dimensional space onto a two-dimensional image. A point R on the triangle has an x, an y and a z coordinate (indicated by lower case letters). The projection of the point R in the image has an X*-coordinate and a Y*-coordinate (indicated by upper case letters).
Texture on the triangle is suggested by means of a texture map. The point R is mapped onto the texture map by allocation of a pair of texture coordinates U*,V* thereto (upper case letters). The texture map allocates an intensity/color value to each pair of texture coordinates U*,V*. Using this coordinate pair U*,V* as an index, the associated intensity/color value is looked up in the texture map and thereby the image contribution by the point R to the pixel where onto it is projected is determined.
In practice, however, not the point R is used but the coordinates X*,Y* of the pixel, i.e. the projection of the point R. In order to determine the image contribution, the associated pair of texture coordinates U*,V* must be found for the coordinates X*,Y*. To this end, in accordance with EP 656 609 first the depth z and the X*,Y* and U*,V* coordinates of the vertices of the triangle are determined. Subsequently, U*/z, V*/z and l/z are calculated for the vertices. The values U*/z, V*/z and l/z for the other points on the triangle can subsequently be determined, rather easily by linear interpolation of these values for the vertices. Subsequently, z is determined from the interpolated l/z by inversion and finally U* and V* are determined by multiplication of the interpolated U*/z and V*/z by z. The inversion l/z is problematic. Known computers, require a comparatively long period of time for the calculation of the inverse and special hardware for faster calculation of this inverse is very complex.